package com.mcptt.config.body;

import java.io.UnsupportedEncodingException;

public class PocSettingsBody {

	private String mcpttId = "";
	
	public PocSettingsBody(String mcpttId)
	{
		this.mcpttId = mcpttId;
	}
	
	public String toString()
	{
		StringBuffer strBuff = new StringBuffer();
		strBuff.append("<?xml version=\"1.0\" encoding=\"UTF-8\"?>").append("\r\n");
		strBuff.append("<poc-settings xmlns=\"urn:oma:params:xml:ns:poc:poc-settings\">").append("\r\n");
		strBuff.append("<entity id=\"").append(mcpttId).append("\">").append("\r\n");
		
		strBuff.append("<isb-settings>").append("\r\n");
		strBuff.append("<incoming-session-barring active=\"true\"/>").append("\r\n");
		strBuff.append("</isb-settings>").append("\r\n");
		
		strBuff.append("<am-settings>").append("\r\n");
		strBuff.append("<answer-mode>automatic</answer-mode>").append("\r\n");
		strBuff.append("</am-settings>").append("\r\n");
		
		strBuff.append("<ipab-settings>").append("\r\n");
		strBuff.append("<incoming-personal-alert-barring active=\"true\"/>").append("\r\n");
		strBuff.append("</ipab-settings>").append("\r\n");
		
		strBuff.append("<sss-settings>").append("\r\n");
		strBuff.append("<simultaneous-sessions-support active=\"true\"/>").append("\r\n");
		strBuff.append("</sss-settings>").append("\r\n");
		
		strBuff.append("</entity>").append("\r\n");
		strBuff.append("</poc-settings>");
		
		try {
			return new String(strBuff.toString().getBytes(),"UTF-8");
		} catch (UnsupportedEncodingException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		
		return strBuff.toString();
	}
	/**
	 * @param args
	 */
	public static void main(String[] args) {
		// TODO Auto-generated method stub

	}

}
